package com.example.tbtx.tbtx.retrofit;


import com.example.tbtx.tbtx.module.AddCollectResponse;
import com.example.tbtx.tbtx.module.CategoryResponse;
import com.example.tbtx.tbtx.module.CheckVersionResponse;
import com.example.tbtx.tbtx.module.MainListResponse;

import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Part;
import retrofit2.http.Path;
import retrofit2.http.Streaming;
import retrofit2.http.Url;

/**
 * Created by Serenade on 17/6/10.
 */

public interface RetrofitApi {
    String Host = "http://39.105.97.219:8090";

//
//    @GET(Host)
//    Call<MusicSearchResult> getSearchResult(@Query("keyword") String songName, @Query("page") int page);
//
//
//    @GET(LyricHost)
//    Call<LyricResult> getLyricResult(@Query("musicid") int musicid);
//

    @GET("/Ols/type/getAllType")
    Call<CategoryResponse> getCategory();

    @GET("/Ols/educational/getEducationalByType/{id}/{user_name}")
    Call<MainListResponse> getMainListResponse(@Path("id") int id, @Path("user_name") String user_name);

    @GET("Ols/collect/addEducationalForCollect/{id}/{courseid}/{user_name}")
    Call<AddCollectResponse> addCollection(@Path("id") String id, @Path("courseid") String courseid, @Path("user_name") String user_name);

    @GET("/Ols/collect/deleteEducationalFromCollect/{id}/{courseid}/{user_name}")
    Call<AddCollectResponse> delCollecttion(@Path("id") String id, @Path("courseid") String courseid, @Path("user_name") String user_name);

    @GET("/Ols/apk/getApkLastVersion")
    Call<CheckVersionResponse> checkVersion();

    @GET
    @Streaming
    Call<ResponseBody> downloadApk(@Url String url);
}
